
        <h1>Term Report</h1>
        <p>Report Date Version: <?php echo date('d').' '. $this->date_func->month_localize(date('m')). ' ' . date('Y') .' | '.date('h:i A')?> </p>
    </div>

    <div id="kanan"> 
        <img src="<?php echo base_url()?>images/logocic.png" width="620" height="350" />
    </div>
    <div class="clear"></div>
    <div id="isi">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" id="nol">
            <tr>
                <th colspan="3"><h3>Summary</h3></th>
            </tr>
            <tr>
                <td>Total Jumlah Peserta</td>
                <td>Total Pemasukkan</td>
                <td>Total Jumlah Kelas</td>
            </tr>
            <tr>
                <td><strong><?php echo $total?> Orang</strong></td>
                <td><strong>Rp <?php echo number_format($total_pemasukan,0,',','.') ?></strong></td>
                <td><strong><?php echo $total_kelas?></strong></td>
            </tr>
        </table>
        <table border="0" cellpadding="0" cellspacing="0" id="satu">
            <tr>
                <th colspan="2"><h3> Peserta | <?php echo $total?> Orang</h3></th>
            </tr>
            <tr>
                <td>Mahasiswa ITB</td>
                <td><?php echo ($dist_peserta[1]+$dist_peserta[2])?></td>
            </tr>
            <tr>
                <td>Pelajar dan Mahasiswa Non ITB</td>
                <td><?php echo $dist_peserta[3]?></td>
            </tr>
            <tr>
                <td>Kalangan Umum</td>
                <td><?php echo $dist_peserta[4]?></td>
            </tr>
            <tr>
                <td>Staff ITB</td>
                <td><?php echo $dist_peserta[5]?></td>
            </tr>
            <tr>
                <td>Internal ComLabs</td>
                <td><?php echo $dist_peserta[6]?></td>
            </tr>
            <tr>
                <td>Free Ticket</td>
                <td><?php echo $dist_peserta[5]+$dist_peserta[6]?></td>
            </tr>
            <tr>
                <td>Perbandingan ITB / Non ITB</td>
                <td>
                    <?php echo ($dist_peserta[1]+$dist_peserta[2]+$dist_peserta[5]+$dist_peserta[6])?>/
                    <?php echo $dist_peserta[3]+$dist_peserta[4]?>
                </td>
            </tr>
        </table>
        <table border="0" cellspacing="0" cellpadding="0" id="dua">
            <tr>
                <th><h3>Jumlah Peserta Tiap Pelatihan</h3></th>
            </tr>
            <tr>
                <td>
                    <?php
                        for($i=0;$i<count($hasil);$i++){
                            $kode=$hasil[$i]['KODE_PELATIHAN'];
                            $angkatan=$hasil[$i]['ANGKATAN'];
                            $kodekelas=$kode.'-'.$angkatan;
                            $jum=$this->db->query('select count(ID_USER) as jum from peserta_kelas where ANGKATAN='.$angkatan.' and KODE_PELATIHAN="'.$kode.'"')->row();
                            echo '<div><span>'.$kodekelas.'</span> ('.$jum->jum.')</div>';
                        }
                    ?>
                </td>
            </tr>
            <tr>
                <td class="nilai">Average: <strong><?php echo number_format($total/$total_kelas,2)?> Orang/Kelas</strong></td>
            </tr>
        </table>

        <table border="0" cellspacing="0" cellpadding="0" id="tiga">
            <tr>
                <th><h3>Pemasukan | Rp <?php echo number_format($total_pemasukan,0,',','.')?>

            </h3></th>
            </tr>
            <tr>
                <td>      
                    <?php
                        for($i=0;$i<count($hasil);$i++){
                            $kode=$hasil[$i]['KODE_PELATIHAN'];
                            $angkatan=$hasil[$i]['ANGKATAN'];
                            $kodekelas=$kode.'-'.$angkatan;
                            $jum=$this->db->query('select sum(TOTAL_BAYAR) as jum from peserta_kelas where ANGKATAN='.$angkatan.' and KODE_PELATIHAN="'.$kode.'"')->row();
                            echo '<div><span>'.$kodekelas.'</span> Rp '.number_format($jum->jum,0,',','.').'</div>';
                        }
                    ?>
                </td>
            </tr>
            <tr>
                <td class="nilai">Average Kelas: <strong>Rp <?php echo number_format($total_pemasukan/$total_kelas,0,',','.')?>/Kelas</strong></td>
            </tr>
            <tr>
                <td class="">Average Orang: <strong>Rp <?php echo number_format($total_pemasukan/$total,0,',','.')?>/Orang</strong></td>
            </tr>
        </table>
    </div>

    <p class="x">This Report Generated Automatically Under ComLabs IT Course Information System</p>
    <p>Printed By: <strong><?php echo $this->session->userdata('Nama');?></strong></p>

    <p class="x2">Bandung, <?php echo date('d').' '. $this->date_func->month_localize(date('m')). ' ' . date('Y') ?></p>
    <p>Mengetahui:</p>

    <p class="feri"><strong>Feri W. Ardi, S.T.</strong></p>
    <p>Koordinator Program</p>

</body>
</html>
